home *** CD-ROM | disk | FTP | other *** search
/ The CICA Windows Explosion! / The CICA Windows Explosion! - Disc 2.iso / nt / sb_nt.exe / OEMSETUP.INF < prev    next >
INI File  |  1993-10-19  |  18KB  |  604 lines

  1. ;-----------------------------------------------------------------------
  2. ; OPTION TYPE
  3. ; -----------
  4. ; This identifies the Option type we are dealing with.  The different
  5. ; possible types are:
  6. ;
  7. ; COMPUTER, VIDEO, POINTER, KEYBOARD, LAYOUT, SCSI, TAPE, PRINTER, ...
  8. ;-----------------------------------------------------------------------
  9.  
  10. [Identification]
  11.     OptionType = SCSI
  12.  
  13. ;-----------------------------------------------------------------------
  14. ; LANGUAGES SUPPORTED
  15. ; -------------------
  16. ;
  17. ; The languages supported by the INF, For every language supported
  18. ; we need to have a separate text section for every displayable text
  19. ; section.
  20. ;
  21. ;-----------------------------------------------------------------------
  22.  
  23. [LanguagesSupported]
  24.     ENG
  25.  
  26.  
  27. ;-----------------------------------------------------------------------
  28. ; OPTION LIST
  29. ; -----------
  30. ; This section lists the Option key names.  These keys are locale
  31. ; independent and used to represent the option in a locale independent
  32. ; manner.
  33. ;
  34. ;-----------------------------------------------------------------------
  35.  
  36. [Options]
  37.     "SBCDNT"    = SbcdNt
  38.  
  39. ;-----------------------------------------------------------------------
  40. ; OPTION TEXT SECTION
  41. ; -------------------
  42. ; These are text strings used to identify the option to the user.  There
  43. ; are separate sections for each language supported.  The format of the
  44. ; section name is "OptionsText" concatenated with the Language represented
  45. ; by the section.
  46. ;
  47. ;-----------------------------------------------------------------------
  48.  
  49. [OptionsTextENG]
  50.     "SBCDNT"    = "CD-ROM driver for Sound Blaster Card"
  51.  
  52.  
  53. ;-----------------------------------------------------------------------------------------
  54. ; SCSI MINIPORT DRIVERS:
  55. ;
  56. ; Order of the information:
  57. ;
  58. ; Class driver = Type, Group, ErrorControl, Tag, EventMessageFile, TypesSupported
  59. ;
  60. ;-----------------------------------------------------------------------------------------
  61.  
  62. [MiniportDrivers]
  63.     SbcdNt  = !SERVICE_KERNEL_DRIVER, "SCSI Miniport", !SERVICE_ERROR_NORMAL,  17, %SystemRoot%\System32\IoLogMsg.dll , 7
  64.  
  65. ;---------------------------------------------------------------------------
  66. ; 1. Identify
  67. ;
  68. ; DESCRIPTION:   To verify that this INF deals with the same type of options
  69. ;                as we are choosing currently.
  70. ;
  71. ; INPUT:         None
  72. ;
  73. ; OUTPUT:        $($R0): STATUS: STATUS_SUCCESSFUL
  74. ;                $($R1): Option Type (COMPUTER ...)
  75. ;                $($R2): Diskette description
  76. ;---------------------------------------------------------------------------
  77.  
  78. [Identify]
  79.     ;
  80.     ;
  81.     read-syms Identification
  82.  
  83.     set Status     = STATUS_SUCCESSFUL
  84.     set Identifier = $(OptionType)
  85.     set Media      = #("Source Media Descriptions", 1, 1)
  86.  
  87.     Return $(Status) $(Identifier) $(Media)
  88.  
  89.  
  90.  
  91. ;------------------------------------------------------------------------
  92. ; 2. ReturnOptions:
  93. ;
  94. ; DESCRIPTION:   To return the option list supported by this INF and the
  95. ;                localised text list representing the options.
  96. ;
  97. ;
  98. ; INPUT:         $($0):  Language used. ( ENG | FRN | ... )
  99. ;
  100. ; OUTPUT:        $($R0): STATUS: STATUS_SUCCESSFUL |
  101. ;                                STATUS_NOLANGUAGE
  102. ;                                STATUS_FAILED
  103. ;
  104. ;                $($R1): Option List
  105. ;                $($R2): Option Text List
  106. ;------------------------------------------------------------------------
  107.  
  108. [ReturnOptions]
  109.     ;
  110.     ;
  111.     set Status        = STATUS_FAILED
  112.     set OptionList     = {}
  113.     set OptionTextList = {}
  114.  
  115.     ;
  116.     ; Check if the language requested is supported
  117.     ;
  118.     set LanguageList = ^(LanguagesSupported, 1)
  119.     Ifcontains(i) $($0) in $(LanguageList)
  120.     goto returnoptions
  121.     else
  122.     set Status = STATUS_NOLANGUAGE
  123.     goto finish_ReturnOptions
  124.     endif
  125.  
  126.     ;
  127.     ; form a list of all the options and another of the text representing
  128.     ;
  129.  
  130. returnoptions = +
  131.     set OptionList     = ^(Options, 0)
  132.     set OptionTextList = ^(OptionsText$($0), 1)
  133.     set Status         = STATUS_SUCCESSFUL
  134.  
  135. finish_ReturnOptions = +
  136.     Return $(Status) $(OptionList) $(OptionTextList)
  137.  
  138.  
  139. ;
  140. ; 3. InstallOption:
  141. ;
  142. ; FUNCTION:  To copy files representing Options
  143. ;            To configure the installed option
  144. ;            To update the registry for the installed option
  145. ;
  146. ; INPUT:     $($0):  Language to use
  147. ;            $($1):  OptionID to install
  148. ;            $($2):  SourceDirectory
  149. ;            $($3):  AddCopy  (YES | NO)
  150. ;            $($4):  DoCopy   (YES | NO)
  151. ;            $($5):  DoConfig (YES | NO)
  152. ;
  153. ; OUTPUT:    $($R0): STATUS: STATUS_SUCCESSFUL |
  154. ;                            STATUS_NOLANGUAGE |
  155. ;                            STATUS_USERCANCEL |
  156. ;                            STATUS_FAILED
  157. ;
  158.  
  159. [InstallOption]
  160.  
  161.     ;
  162.     ; Set default values for
  163.     ;
  164.     set Status = STATUS_FAILED
  165.     set DrivesToFree = {}
  166.  
  167.     ;
  168.     ; extract parameters
  169.     ;
  170.     set Option   = $($1)
  171.     set SrcDir   = $($2)
  172.     set AddCopy  = $($3)
  173.     set DoCopy   = $($4)
  174.     set DoConfig = $($5)
  175.  
  176.     ;
  177.     ; Check if the language requested is supported
  178.     ;
  179.     set LanguageList = ^(LanguagesSupported, 1)
  180.     Ifcontains(i) $($0) in $(LanguageList)
  181.     else
  182.     set Status = STATUS_NOLANGUAGE
  183.     goto finish_InstallOption
  184.     endif
  185.     read-syms Strings$($0)
  186.  
  187.     ;
  188.     ; check to see if Option is supported.
  189.     ;
  190.  
  191.     set OptionList = ^(Options, 0)
  192.     ifcontains $(Option) in $(OptionList)
  193.     else
  194.     Debug-Output "SCSI.INF: SCSI option is not supported."
  195.     goto finish_InstallOption
  196.     endif
  197.     set OptionList = ""
  198.  
  199.     ;
  200.     ; Option has been defined already
  201.     ;
  202.  
  203.     set MiniportDriver   =   #(Options,         $(Option),         1)
  204.     set Type             = $(#(MiniportDrivers, $(MiniportDriver), 1))
  205.     set Group            =   #(MiniportDrivers, $(MiniportDriver), 2)
  206.     set ErrorControl     = $(#(MiniportDrivers, $(MiniportDriver), 3))
  207.     set Tag              =   #(MiniportDrivers, $(MiniportDriver), 4)
  208.     set EventMessageFile =   #(MiniportDrivers, $(MiniportDriver), 5)
  209.     set TypesSupported   =   #(MiniportDrivers, $(MiniportDriver), 6)
  210.  
  211.     set Start            =   $(!SERVICE_SYSTEM_START)
  212.     shell "registry.inf" GetServicesEntryStart $(MiniportDriver)
  213.     ifint $($ShellCode) == $(!SHELL_CODE_OK)
  214.     ifstr(i) $($R0) == "STATUS_SUCCESSFUL"
  215.         ifstr(i) $($R1) == $(!SERVICE_BOOT_START)
  216.         set Start = $(!SERVICE_BOOT_START)
  217.         endif
  218.     endif
  219.     endif
  220.  
  221. installtheoption = +
  222.  
  223.     ;
  224.     ; Code to add files to copy list
  225.     ;
  226.  
  227.     ifstr(i) $(AddCopy) == "YES"
  228.     set DoActualCopy = NO
  229.     set FileToCheck = #(Files-ScsiMiniportDrivers, $(MiniportDriver), 2)
  230.     LibraryProcedure STATUS,$(!LIBHANDLE),CheckFileExistance $(!STF_WINDOWSSYSPATH)"\drivers\"$(FileToCheck)
  231.     ifstr(i) $(STATUS) == NO
  232.         set DoActualCopy = YES
  233.     endif
  234.  
  235.     ifstr(i) $(DoActualCopy) == NO
  236.         shell "subroutn.inf" DriversExist $($0) $(String1)
  237.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  238.         Debug-Output "SCSI.INF: shelling DriversExist failed"
  239.         goto finish_InstallOption
  240.         endif
  241.  
  242.         ifstr(i) $($R0) == STATUS_CURRENT
  243.         else-ifstr(i) $($R0) == STATUS_NEW
  244.         set DoActualCopy = YES
  245.         else-ifstr(i) $($R0) == STATUS_USERCANCEL
  246.         Debug-Output "SCSI.INF: User cancelled SCSI installation"
  247.         goto finish_InstallOption
  248.         else
  249.         Debug-Output "SCSI.INF: Error reported in DriversExist routine in SUBROUTN.INF"
  250.         goto finish_InstallOption
  251.         endif
  252.     endif
  253.  
  254.     ifstr(i) $(DoActualCopy) == YES
  255.  
  256.         shell "subroutn.inf" DoAskSourceEx $(SrcDir) $(String2)
  257.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  258.         Debug-Output "SCSI.INF: shelling DoAskSourceEx failed"
  259.         goto finish_InstallOption
  260.         endif
  261.  
  262.         ifstr(i) $($R0) == STATUS_SUCCESSFUL
  263.         set SrcDir = $($R1)
  264.         ifstr(i) $($R2) != ""
  265.             set DrivesToFree = >($(DrivesToFree), $($R2))
  266.         endif
  267.         else
  268.         Debug-Output "SCSI.INF: User cancelled asking source."
  269.         goto finish_InstallOption
  270.         endif
  271.  
  272.         install Install-AddCopyOption
  273.         ifstr(i) $(STF_INSTALL_OUTCOME) != "STF_SUCCESS"
  274.         Debug-Output "Adding SCSI files to copy list failed"
  275.         goto finish_InstallOption
  276.         endif
  277.     else
  278.         set DoCopy = NO
  279.     endif
  280.  
  281.     endif
  282.  
  283.     ifstr(i) $(DoCopy) == "YES"
  284.     read-syms ProgressCopy$($0)
  285.     install Install-DoCopyOption
  286.     ifstr(i) $(STF_INSTALL_OUTCOME) == "STF_FAILURE"
  287.         Debug-Output "Copying files failed"
  288.         goto finish_InstallOption
  289.     else-ifstr(i) $(STF_INSTALL_OUTCOME) == "STF_USERQUIT"
  290.         set Status = STATUS_USERCANCEL
  291.         goto finish_InstallOption
  292.     endif
  293.     endif
  294.  
  295.     ifstr(i) $(DoConfig) == "YES"
  296.     ;
  297.     ; first run a privilege check on modifying the setup node
  298.     ;
  299.  
  300.     shell "registry.inf" CheckSetupModify
  301.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  302.         goto finish_InstallOption
  303.     endif
  304.  
  305.     ifstr(i) $($R0) != STATUS_SUCCESSFUL
  306.         goto finish_InstallOption
  307.     endif
  308.  
  309.     ;
  310.     ; then make a new SCSI entry, the entry is created automatically
  311.     ; enabled
  312.     ;
  313.  
  314.     set ServiceNode   = $(MiniportDriver)
  315.     set ServiceBinary = %SystemRoot%\System32\drivers\#(Files-ScsiMiniportDrivers, $(MiniportDriver), 2)
  316.  
  317.     set ServicesValues   = { +
  318.         {Type,           0, $(!REG_VT_DWORD),     $(Type)                  }, +
  319.         ;{Start,          0, $(!REG_VT_DWORD),     $(Start)                 }, +
  320.         {Start,          0, $(!REG_VT_DWORD),     0                        }, +      
  321.         {Group,          0, $(!REG_VT_SZ),        $(Group)                 }, +
  322.         {ErrorControl,   0, $(!REG_VT_DWORD),     $(ErrorControl)          }, +
  323.         {Tag,            0, $(!REG_VT_DWORD),     $(Tag)                   }, +
  324.         {BinaryPathName, 0, $(!REG_VT_EXPAND_SZ), $(ServiceBinary)         }  +
  325.         }
  326.     set ParametersValues = ""
  327.     set DeviceValues     = {}
  328.     set EventLogValues   = { +
  329.         {EventMessageFile, 0, $(!REG_VT_EXPAND_SZ), $(EventMessageFile) }, +
  330.         {TypesSupported,   0, $(!REG_VT_DWORD),     $(TypesSupported)   }  +
  331.         }
  332.  
  333.     shell "registry.inf"  MakeServicesEntry $(ServiceNode)      +
  334.                         $(ServicesValues)   +
  335.                         $(ParametersValues) +
  336.                         $(DeviceValues)     +
  337.                         $(EventLogValues)   +
  338.                         Parameters
  339.  
  340.  
  341.  
  342.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  343.         Debug-Output "Couldn't execute MakeServicesEntry in registry.inf"
  344.         goto finish_InstallOption
  345.     endif
  346.  
  347.     ifstr(i) $($R0) != STATUS_SUCCESSFUL
  348.         Debug-Output "MakeServicesEntry failed for SCSI"
  349.         goto finish_InstallOption
  350.     endif
  351.  
  352.     endif
  353.  
  354.     set Status = STATUS_SUCCESSFUL
  355. finish_InstallOption = +
  356.     ForListDo $(DrivesToFree)
  357.     LibraryProcedure STATUS,$(!LIBHANDLE), DeleteNetConnection $($) "TRUE"
  358.     EndForListDo
  359.  
  360.     Return $(Status)
  361.  
  362.  
  363. [Install-AddCopyOption]
  364.  
  365.     ;
  366.     ; Add the files to the copy list
  367.     ;
  368.     AddSectionKeyFileToCopyList   Files-ScsiMiniportDrivers         +
  369.                   $(MiniportDriver)                 +
  370.                   $(SrcDir)                      +
  371.                   $(!STF_WINDOWSSYSPATH)\drivers
  372.  
  373.     exit
  374.  
  375.  
  376. [Install-DoCopyOption]
  377.  
  378.     ;
  379.     ; Copy files in the copy list
  380.     ;
  381.     CopyFilesInCopyList
  382.     exit
  383.  
  384. ;-------------------------------------------------------------------------
  385. ; 4. DeInstallOption:
  386. ;
  387. ; FUNCTION:  To remove files representing Option
  388. ;            To remove the registry entry corresponding to the Option
  389. ;
  390. ; INPUT:     $($0):  Language to use
  391. ;            $($1):  OptionID to install
  392. ;
  393. ; OUTPUT:    $($R0): STATUS: STATUS_SUCCESSFUL |
  394. ;                            STATUS_NOLANGUAGE |
  395. ;                            STATUS_USERCANCEL |
  396. ;                            STATUS_FAILED
  397. ;-------------------------------------------------------------------------
  398. [DeInstallOption]
  399.     ;
  400.     ; Set default values for
  401.     ;
  402.     set Status   = STATUS_FAILED
  403.     ;
  404.     ; extract parameters
  405.     ;
  406.     set Option   = $($1)
  407.  
  408.     ;
  409.     ; Check if the language requested is supported
  410.     ;
  411.     set LanguageList = ^(LanguagesSupported, 1)
  412.     Ifcontains(i) $($0) in $(LanguageList)
  413.     else
  414.     set Status = STATUS_NOLANGUAGE
  415.     goto finish_DeInstallOption
  416.     endif
  417.     read-syms Strings$($0)
  418.  
  419.     ;
  420.     ; check to see if Option is supported.
  421.     ;
  422.  
  423.     set OptionList = ^(Options, 0)
  424.     ifcontains $(Option) in $(OptionList)
  425.     else
  426.     goto finish_DeInstallOption
  427.     endif
  428.     set OptionList = ""
  429.  
  430.     ;
  431.     ; fetch details about option
  432.     ;
  433.  
  434.     set MiniportDriver = #(Options, $(Option), 1)
  435.     set MiniportFile   = #(Files-ScsiMiniportDrivers, $(MiniportDriver), 2)
  436.     set FilePath       = $(!STF_WINDOWSSYSPATH)"\drivers\"$(MiniportFile)
  437.  
  438.     ;
  439.     ; check to see if file is installed
  440.     ; if not give success
  441.     ;
  442.  
  443.     LibraryProcedure STATUS,$(!LIBHANDLE),CheckFileExistance $(FilePath)
  444.     ifstr(i) $(STATUS) == "NO"
  445.     set Status = STATUS_SUCCESSFUL
  446.     goto finish_DeInstallOption
  447.     endif
  448.  
  449.     shell "registry.inf" GetServicesEntryStart $(MiniportDriver)
  450.     ifstr(i) $($R0) != "STATUS_SUCCESSFUL"
  451.     ; this could happen if there is no start value or there is no
  452.     ; key, in which case the option is not installed
  453.     set Status = STATUS_SUCCESSFUL
  454.     goto finish_DeInstallOption
  455.     endif
  456.  
  457.     ifstr(i) $($R1) == $(!SERVICE_BOOT_START)
  458.     shell "subroutn.inf" SetupMessage $(!STF_LANGUAGE) "WARNING" $(String3)
  459.     ifstr(i) $($R0) != STATUS_SUCCESSFUL
  460.         goto do_removal
  461.     endif
  462.     ifstr(i) $($R1) == "CANCEL"
  463.         goto finish_DeInstallOption
  464.     endif
  465.     endif
  466.  
  467. do_removal =+
  468.     ;
  469.     ; disable the registry entry
  470.     ;
  471.  
  472.     shell "registry.inf" RemoveServicesEntry $(MiniportDriver)
  473.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  474.     Debug-Output "SCSI.INF: Failed to shell RemoveServicesEntry"
  475.     goto finish_DeInstallOption
  476.     endif
  477.  
  478.     ifstr(i) $($R0) != STATUS_SUCCESSFUL
  479.     Debug-Output "SCSI.INF: Failed to disable services entry"
  480.     goto finish_DeInstallOption
  481.     endif
  482.  
  483.     ;
  484.     ; we won't remove the file because we can only do so during the next boot.
  485.     ; if the user chooses to reinstall the same driver during this boot
  486.     ; he will still end up deleting the driver on next boot. if the file
  487.     ; should be deleted a warning should be put up saying that the user should
  488.     ; not try to reinstall the driver during this boot
  489.     ;
  490.     ;    AddFileToDeleteList $(FilePath)
  491.  
  492.     set Status = STATUS_SUCCESSFUL
  493.  
  494. finish_DeInstallOption =+
  495.     return $(Status)
  496.  
  497.  
  498. ;-------------------------------------------------------------------------
  499. ; 5. GetInstalledOptions:
  500. ;
  501. ; FUNCTION:  To find out the list of options which are installed
  502. ;
  503. ; INPUT:     $($0): Language to Use
  504. ;
  505. ; OUTPUT:    $($R0): STATUS: STATUS_SUCCESSFUL |
  506. ;                            STATUS_FAILED
  507. ;
  508. ;            $($R1): List of options installed
  509. ;            $($R2): Option installed Text List
  510. ;-------------------------------------------------------------------------
  511. [GetInstalledOptions]
  512.     set Status = STATUS_FAILED
  513.     set InstalledOptions = {}
  514.     set InstalledOptionsText = {}
  515.  
  516.     ;
  517.     ; Check if the language requested is supported
  518.     ;
  519.     set LanguageList = ^(LanguagesSupported, 1)
  520.     Ifcontains(i) $($0) in $(LanguageList)
  521.     else
  522.     set Status = STATUS_NOLANGUAGE
  523.     goto finish_GetInstalledOptions
  524.     endif
  525.  
  526.     set OptionList = ^(Options, 0)
  527.     ForListDo $(OptionList)
  528.     set MiniportDriver = #(Options, $($), 1)
  529.     set MiniportFile   = #(Files-ScsiMiniportDrivers, $(MiniportDriver), 2)
  530.     set FilePath       = $(!STF_WINDOWSSYSPATH)"\drivers\"$(MiniportFile)
  531.     LibraryProcedure STATUS,$(!LIBHANDLE),CheckFileExistance $(FilePath)
  532.     ifstr(i) $(STATUS) == "YES"
  533.         shell "registry.inf" GetServicesEntryStart $(MiniportDriver)
  534.         ifint $($ShellCode) == $(!SHELL_CODE_OK)
  535.         ifstr(i) $($R0) == STATUS_SUCCESSFUL
  536.             ifstr(i) $($R1) != $(!SERVICE_DISABLED)
  537.  
  538.             set OptionText = #(OptionsText$($0), $($), 1)
  539.             set InstalledOptions     = >($(InstalledOptions), $($))
  540.             set InstalledOptionsText = >($(InstalledOptionsText), $(OptionText))
  541.  
  542.             endif
  543.         endif
  544.         endif
  545.     endif
  546.     EndForListDo
  547.     set Status = STATUS_SUCCESSFUL
  548. finish_GetInstalledOptions =+
  549.     Return $(Status) $(InstalledOptions) $(InstalledOptionsText)
  550.  
  551.  
  552. ;**************************************************************************
  553. ; PROGRESS GUAGE VARIABLES
  554. ;**************************************************************************
  555.  
  556. [ProgressCopyENG]
  557.     ProCaption   = "Windows NT Setup"
  558.     ProCancel    = "Cancel"
  559.     ProCancelMsg = "Windows NT is not correcly installed.  Are you sure you want "+
  560.            "to cancel copying files?"
  561.     ProCancelCap = "Setup Message"
  562.     ProText1     = "Copying:"
  563.     ProText2     = "To:"
  564.  
  565. [StringsENG]
  566.     String1 = "SCSI Adapter"
  567.     String2 = "Please enter the full path to the SBCDNT "+
  568.           "files.  Then choose Continue."
  569.     String3 = "The SCSI Adapter has been marked as a boot device.  Removing "+
  570.           "it may cause the system not to boot."$(!LF)$(!LF)"Are you sure "+
  571.           "you want to remove the Adapter."
  572.  
  573. [Source Media Descriptions]
  574.     1  = "SBCDNT"  , TAGFILE = SbcdNt.sys
  575.  
  576. [Files-ScsiMiniportDrivers]
  577. ;oemscsi = 1,oemscsi.sys , SIZE=999
  578.  SbcdNt = 1,sbcdnt.sys , SIZE=25088
  579.  
  580.  
  581. [Installable.Drivers]
  582. sb16snd = 1:sb16snd.dll, "KERNEL", "Creative Sound Blaster 16 Wave and MIDI" ,,, sbsynth
  583. sbpsnd  = 1:sbpsnd.dll,  "KERNEL", "Creative Sound Blaster Pro Wave and MIDI",,, sbsynth
  584. sbsynth = 1:sbsynth.dll, "MIDI",   "Creative MIDI Synthesizer",,,
  585. sb16aux = 1:sb16aux.dll, "AUX",    "Creative Sound Blaster 16 Auxiliary Audio",,,
  586. sbpaux  = 1:sbpaux.dll , "AUX",    "Creative Sound Blaster Pro Auxiliary Audio",,,
  587.  
  588. [sb16snd]
  589. 1:sb16snd.sys
  590.  
  591. [sbpsnd]
  592. 1:sbpsnd.sys
  593.  
  594. [sbsynth]
  595. 1:sbsynth.pat
  596. 1:sbsynth.sys
  597.  
  598. [sb16aux]
  599. 1:sb16aux.sys
  600.  
  601. [sbpaux]
  602. 1:sbpaux.sys
  603.  
  604.